package grape.base.rest.client.comp;

import grape.base.service.comp.po.Comp;
import grape.common.service.trans.ITransService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by yangwei
 * Created at 2020/9/15 17:41
 */
@Component
@FeignClient(value = "grape-base")
public interface CompClient extends ITransService<String, String> {


    /**
     * 翻译
     *
     * @param type
     * @param key
     * @return
     */
    @GetMapping(value = "/base/comp/inner/trans")
    @Override
    public String trans(@RequestParam String type, @RequestParam String key);

    @GetMapping(value = "/base/comp/inner/trans/support")
    @Override
    public boolean support(@RequestParam String type);

    /**
     * 根据用户id查询
     *
     * @param id
     * @return
     */
    @GetMapping(value = "/base/comp/inner/getCompById")
    public Comp getCompById(@RequestParam String id);

}
